<?php
require( ABSPATH . WPINC . '/class-wp.php' );

/**
 * WordPress environment setup class.
 *
 */
class WPZF extends WP {
    

    function handle_404() {
        global $wp_query;
        
        if ( !is_admin() && ( 0 == count( $wp_query->posts ) ) && !is_404() && !is_robots() && !is_search() && !is_home() ) {
            // Don't 404 for these queries if they matched an object.
            if ( ( is_tag() || is_category() || is_tax() || is_author() || is_post_type_archive() ) && $wp_query->get_queried_object() && !is_paged() ) {
                if ( !is_404() )
                    status_header( 200 );
                return;
            }
            
            require_once ABSPATH . 'index.zf.php';
            die();
        } elseif ( !is_404() ) {
            status_header( 200 );
        }
    }

}